﻿using System;
using System.Linq;

class FindSubsetOfGivenSum
{
    static void Main()
    {
        // console input
        int[] numbers; // = { 2, 3, -6, -1, 2, -1, 6, 4, -8, 8 };
        int n = int.Parse(Console.ReadLine());
        numbers = new int[n];

        int k = int.Parse(Console.ReadLine());
        int bestSum = int.Parse(Console.ReadLine());

        for (int counter = 0; counter < numbers.Length; counter++)
        {
            numbers[counter] = int.Parse(Console.ReadLine());
        }
        
        int startElement = 0;
        int endElement = 0;
        bool isFountSequence = false;
        

        for (int counter = 0; counter < numbers.Length; counter++)
        {
            int sum = 0;
            int tempStartElement = counter;
            int tempEndElement = counter;

            for (int sequenceCounter = counter; sequenceCounter < numbers.Length; sequenceCounter++)
            {
                sum += numbers[sequenceCounter];
                tempEndElement++;

                // break if the sequence is fount 
                if (sum == bestSum && k==tempEndElement-tempStartElement)
                {
                    startElement = tempStartElement;
                    endElement = tempEndElement;
                    isFountSequence = true;
                    break;

                }
            }
            // break if the sequence is fount 
            if (isFountSequence)
            {
                break;

            }
        }


        //print result if any
        if (isFountSequence)
        {
            for (int counter = startElement; counter < endElement; counter++)
            {
                Console.Write("{0}, ", numbers[counter]);

            }
            Console.WriteLine();

        }
        else
        {
            Console.WriteLine("none");

        }
    }
}